<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ config.site_title }} - 安全临时文件分享平台</title>
    <link rel="stylesheet" href="{{ url_for('static', filename='css/all.min.css') }}">
    <link rel="stylesheet" href="{{ url_for('static', filename='css/main.css') }}">
</head>
<body>
    <!-- 头部 -->
    <header>
        <div class="container">
            <div class="header-content">
                <div class="logo">
                    <i class="fas fa-box-open logo-icon"></i>
                    <div>
                        <div class="logo-text">{{ config.site_title }}</div>
                        <div class="tagline">安全、高效的临时文件分享平台</div>
                    </div>
                </div>
                <div class="header-buttons">
                    <a href="/admin" class="btn btn-outline">
                        <i class="fas fa-user-cog"></i> 管理面板
                    </a>
                </div>
            </div>
        </div>
    </header>

    <div class="container">
        <!-- 主标题区域 -->
        <section class="hero">
            <h1>安全、便捷的临时文件分享</h1>
            <p>FileCodeBox 提供高效安全的临时文件分享服务，无需注册即可上传文件，通过提取码快速分享。文件到期自动销毁，保护您的隐私安全。</p>
            <a href="#upload" class="btn btn-primary">
                <i class="fas fa-cloud-upload-alt"></i> 立即分享文件
            </a>
        </section>

        <!-- 功能特点 -->
        <section class="features">
            <div class="feature-card">
                <div class="feature-icon">
                    <i class="fas fa-shield-alt"></i>
                </div>
                <h3>安全可靠</h3>
                <p>文件加密存储，到期自动销毁，确保您的数据安全无虞</p>
            </div>
            <div class="feature-card">
                <div class="feature-icon">
                    <i class="fas fa-bolt"></i>
                </div>
                <h3>高速传输</h3>
                <p>突破传统限制，支持大文件快速上传下载，无需等待</p>
            </div>
            <div class="feature-card">
                <div class="feature-icon">
                    <i class="fas fa-hourglass-half"></i>
                </div>
                <h3>时效控制</h3>
                <p>自定义文件有效期，到期后自动销毁，不留痕迹</p>
            </div>
        </section>

        <!-- 上传区域 -->
        <section id="upload" class="upload-section">
            <h2 class="section-title">分享文件</h2>
            <div class="upload-area" id="drop-area">
                <div class="upload-icon">
                    <i class="fas fa-cloud-upload-alt"></i>
                </div>
                <div class="upload-text">拖放文件到此处或点击上传</div>
                <div class="upload-hint">支持单个文件，最大{{ config.max_upload_size // (1024 * 1024) }}MB</div>
                <input type="file" id="file-input" hidden>
            </div>
            
            <form class="upload-form" id="upload-form">
                <div class="form-group">
                    <label for="expire-days"><i class="fas fa-clock"></i> 有效期</label>
                    <select class="form-control" id="expire-days" name="expire_days">
                        <option value="1">1天</option>
                        <option value="3">3天</option>
                        <option value="7" selected>7天</option>
                        <option value="14">14天</option>
                        <option value="30">30天</option>
                    </select>
                </div>
                
                <div class="form-group">
                    <label for="max-downloads"><i class="fas fa-download"></i> 最大下载次数</label>
                    <select class="form-control" id="max-downloads" name="max_downloads">
                        <option value="1" selected>1次</option>
                        <option value="3">3次</option>
                        <option value="5">5次</option>
                        <option value="10">10次</option>
                        <option value="999">无限制</option>
                    </select>
                </div>
                
                <button type="button" class="btn btn-primary btn-lg" id="share-btn">
                    <i class="fas fa-share-alt"></i> 生成分享链接
                </button>
            </form>
            
            <div id="upload-result"></div>
        </section>

        <!-- 下载区域 -->
        <section class="download-section">
            <h2 class="section-title">提取文件</h2>
            <form class="download-form" id="download-form">
                <input type="text" class="download-input" id="access-code" placeholder="输入6位提取码" required>
                <button type="submit" class="download-btn">
                    <i class="fas fa-download"></i> 提取文件
                </button>
            </form>
            <div id="download-result"></div>
        </section>

        <!-- 统计信息 -->
        <section class="stats">
            <div class="stat-card">
                <div class="stat-value">12,548</div>
                <div class="stat-label">已分享文件</div>
            </div>
            <div class="stat-card">
                <div class="stat-value">98.7%</div>
                <div class="stat-label">传输成功率</div>
            </div>
            <div class="stat-card">
                <div class="stat-value">24/7</div>
                <div class="stat-label">稳定在线</div>
            </div>
            <div class="stat-card">
                <div class="stat-value">256GB</div>
                <div class="stat-label">每日传输量</div>
            </div>
        </section>
    </div>

    <!-- 页脚 -->
    <footer>
        <div class="container">
            <div class="footer-content">
                <div class="footer-section">
                    <h3>{{ config.site_title }}</h3>
                    <p>安全、高效的临时文件分享平台，专注于为用户提供便捷的文件传输服务。</p>
                </div>
                
                <div class="footer-section">
                    <h3>快速链接</h3>
                    <ul class="footer-links">
                        <li><a href="#"><i class="fas fa-home"></i> 首页</a></li>
                        <li><a href="#upload"><i class="fas fa-cloud-upload-alt"></i> 分享文件</a></li>
                        <li><a href="#"><i class="fas fa-download"></i> 提取文件</a></li>
                        <li><a href="/admin"><i class="fas fa-user-cog"></i> 管理面板</a></li>
                    </ul>
                </div>
                
                <div class="footer-section">
                    <h3>支持类型</h3>
                    <ul class="footer-links">
                        <li><a href="#"><i class="fas fa-file-alt"></i> 文档 (PDF, DOC, DOCX)</a></li>
                        <li><a href="#"><i class="fas fa-file-image"></i> 图片 (JPG, PNG, GIF)</a></li>
                        <li><a href="#"><i class="fas fa-file-video"></i> 视频 (MP4, MOV, AVI)</a></li>
                        <li><a href="#"><i class="fas fa-file-archive"></i> 压缩包 (ZIP, RAR)</a></li>
                    </ul>
                </div>
            </div>
            
            <div class="copyright">
                &copy; {{ config.site_title }} © {{ current_year }} - 安全临时文件分享平台 | 
                最大文件大小: {{ config.max_upload_size // (1024 * 1024) }} MB | 支持的文件类型: {{ config.allowed_extensions }}
            </div>
        </div>
    </footer>

    <script src="{{ url_for('static', filename='js/main.js') }}"></script>
</body>
</html>